# Copyright (c) 2021 HPMicro
# SPDX-License-Identifier: BSD-3-Clause

cmake_minimum_required(VERSION 3.13)

find_package(hpm-sdk REQUIRED HINTS $ENV{HPM_SDK_BASE})

project(spi_lcd)

set(STACK_SIZE 0x10000)

file(GLOB_RECURSE LVGL_SRC lvgl/src/*.c)
sdk_inc(lvgl)
sdk_src(${LVGL_SRC})

file(GLOB_RECURSE LVGL_DEMO_SRC lvgl/demos/benchmark/*.c)
#file(GLOB_RECURSE LVGL_DEMO_SRC lvgl/demos/music/*.c)

sdk_src(${LVGL_DEMO_SRC})

sdk_compile_definitions(-DLV_USE_DEMO_BENCHMARK=1)
#sdk_compile_definitions(-DLV_USE_DEMO_MUSIC=1)

sdk_compile_definitions(-DCONFIG_LV_HAS_EXTRA_CONFIG="lv_app_conf.h")

sdk_inc(src)
sdk_app_src(src/spi_lcd.c)

sdk_app_src(src/main.c)
#sdk_app_src(src/music.c)

generate_ses_project()
